{{define "articTitle"}}
    <form class="article_editor_title trim">
        <input type="text" placeholder="请在这里输入标题" name="title" max-length="64" id="article-title">
    </form>
{{end}}

{{define "articType"}}
    <div class="article_editor_info">
        <select id="article-type">
            <option value="" style="display: none;">--请选择--</option>
            {{range $i, $v := .list}}
                {{if $v.child}}
                    <optgroup label="{{$v.name}}">
                        {{range $key, $item := $v.child}}
                            <option value="{{$v.id}},{{$item.id}}">{{$item.name}}</option>
                        {{end}}
                    </optgroup>
                    {{/*过滤首页*/}}
                {{else if and (eq $v.child_status false) (ne $v.name "首页")}}
                    <option value="{{$v.id}}">{{$v.name}}</option>
                {{end}}
            {{end}}
        </select>
        <label>
            <span>发布于</span>
            <input
                    class="l form-control"
                    value="{{.CreatedTime}}"
                    type="text"
                    data-toggle="input-mask"
                    data-mask-format="0000/00/00 00:00:00"
                    id="article-created"
            >
        </label>
        <label>
            <span>最后编辑</span>
            <input
                    class="l form-control"
                    value="{{.UpdateTime}}"
                    type="text"
                    data-toggle="input-mask"
                    data-mask-format="0000/00/00 00:00:00"
                    id="article-update"
            >
        </label>
        <label>
            <span>阅读数</span>
            <input type="text" class="s" placeholder="0" id="article-view">
        </label>
    </div>
{{end}}

{{define "articleSetting"}}
    <div class="article_editor_options">
        <div class="article_editor_info2">
            <div class="tit">封面摘要</div>
            <div class="con">
                <div class="fl">
                    <div class="thumb" id="cupload"></div>
                </div>
                <form class="fr trim">
                    <textarea
                            id="article-desc"
                            oninput="articleItemValue()"
                            onchange="articleItemValue()"
                            placeholder="选填，摘要会在文章列表页显露，帮助读者快速了解内容，如不填写则默认抓取正文前200字"
                    ></textarea>
                </form>
            </div>
        </div>
        <div class="article_editor_setting">
            <div class="tit">文章设置</div>
            <div class="articleTags-box">
                <div class="title">标&emsp;签：</div>
                <ul id="articleTags"></ul>
            </div>
            <div class="con">
                <ul>
                    <li>
                        <form class="box trim">
                            <span>关键词：</span>
                            <input type="text" id="keyword" placeholder="选填，关键字将会影响百度收录，每个关键字用逗号隔开">
                        </form>
                    </li>
                    <li>
                        <div class="box">
                            <span>推荐位：</span>
                            <label><input type="checkbox" id="is-top">置顶</label>
                            <label><input type="checkbox" id="hot">热门</label>
                            <label><input type="checkbox" id="recommend">推荐</label>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    </div>
{{end}}

{{define "articeSave"}}
    <div class="article_editor_savebar">
        <div class="wrapper">
            <div class="fl"><span>正文字数<i class="article_editor_charCount">0</i></span></div>
            <div class="fr">
                <button type="button" onclick="save(true)">保存发布</button>
                <button type="button" class="bg-danger text-light" onclick="save(false)">草稿箱</button>
                <button>取消发布</button>
            </div>
        </div>
    </div>
{{end}}